HAR file is a data storage format for HTTP requests, essential for developers in troubleshooting and analyzing web application performance.
This guide explains HAR file structure and provides instructions on how to open HAR files and generate them across different browsers.
HAR file structure
HAR (HTTP Archive) is a JSON-formatted file with a .har extension.
The root element contains a Log object with these components:
Name | Type | Description |
---|---|---|
version | version | Format version number |
creator | object | required |
browser | object | optional |
pages | array | optional |
entries | array | required |
comment | string | optional |
For detailed specifications, refer to the HAR Specification.
How to Export a HAR File From Any Browser
How to get a HAR file in Chrome
- Open DevTools
- Navigate to Network tab
- Click Export HAR icon
These steps work for all Chromium-based browsers.
How to get a HAR file in Firefox
- Open DevTools
- Go to Network tab
- Choose “Save All As HAR”
- Click network settings
How to get a HAR file in Safari
- Open the browser DevTools. You can find instructions for opening DevTools in Safari in this article – how to utilize browser logs for effective QA bug reporting.
- Go to the Network tab.
- Click Export.
Note: Browsers only collect network logs after DevTools is opened. For complete logs, reload the page with DevTools open. The exported HAR file will only contain data from the tab where DevTools was launched.
How to open a HAR file
Your browser’s DevTools is the best HAR file viewer and analyzer, supporting both export and import of HAR files through the Network tab interface.
Open a HAR file in Chrome
- Open DevTools on any tab
- Go to Network tab
- Click Import HAR icon
These steps work for all Chromium browsers like Edge, Opera, Arc, Brave, and Vivaldi.
Open a HAR file in Firefox
- Open DevTools on any tab
- Go to Network tab
- Click network settings icon
- Select “Import HAR Files”
Open a HAR file in Safari
- Open DevTools on any tab
- Go to Network tab
- Click Import
If browsers don’t open HAR files from other browsers, try importing into a different browser or using a newer version. Google HAR Analyzer is recommended for third-party analysis.
How to analyze a HAR file
You can analyze a HAR file directly in your browser without additional software. Your browser serves as an effective HAR file analyzer. Here’s how to analyze HAR files for different purposes:
Troubleshooting using a HAR file
HAR files contain response codes, request content, and server responses. To identify errors:
- Sort requests by status (highest to lowest)
- Look for status codes 400-499 and 500-599
- Click requests to view details including:
- Headers
- Request data
- Server response
This information helps diagnose request errors and debug application states.
Performance optimization using a HAR file
HAR files help improve web performance by tracking:
- Request and response times
- Response memory size
- Cache status
This data helps identify slow requests and optimization opportunities. Browsers provide timeline views for easier analysis.
How to export and analyze a HAR file with the Webvizio extension
Webvizio streamlines HAR file analysis by:
- Automatically collecting network request data
- Eliminating manual HAR file exports
- Providing DevTools-like interface
To access Network logs in Webvizio:
- Keep the DevTools panel open while adding a task using the Webvizio browser extension
- Create a task by adding a pin on any webpage element selector
- View logs in the Network tab on the task page
- To download the HAR file, use the Download HAR link in the Network tab.
This extension simplifies QA testing and bug reporting for web applications.